package com.flyduck.mall.oms.remote.controller;

import com.flyduck.mall.oms.remote.service.RemoteOrderService;
import com.flyduck.ss.common.core.domain.R;

import com.flyduck.mall.oms.api.vo.RemoteOrderRespVO;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * RemoteOrderController
 * </p>
 *
 * @author flyduck
 * @since 2024-07-23
 */
@RestController
@RequestMapping("/order/remote/order")
public class RemoteOrderController {

    @DubboReference
    private RemoteOrderService remoteOrderService;

    //@InnerAuth
    @GetMapping("/getOrderById/{id}")
    public R<RemoteOrderRespVO> getOrderDetailsById(@PathVariable("id") Long id){
        RemoteOrderRespVO remoteOrderRespVO = remoteOrderService.getOrderById(id);
        return R.ok(remoteOrderRespVO);
    }

}
